#! /bin/sh

# Script that is executed whenever a new user is created in the
# external user source, such as an Active Directory tree or
# /etc/passwd.

# This script executes all scripts in @USERSCRIPTDIR@/createuser.d
# using find.  The environment variable KOPANO_USER is set, but
# beware that this string can contain any characters, so take heed to
# correct quoting.

if [ -f @sysconfdir@/sysconfig/kopano ]; then
  . @sysconfdir@/sysconfig/kopano
elif [ -f @sysconfdir@/default/kopano ]; then
  . @sysconfdir@/default/kopano
fi

KOPANO_USER_SCRIPTS=@USERSCRIPTDIR@/createuser.d
. @USERSCRIPTDIR@/users_common.sh
